<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
  <link rel="shortcut icon" href="favicon.ico" type="image/x-icon"/>
  <?php if(empty($title)): ?><title>Notice - QSC</title>
  <?php else: ?>
  <title>$title</title><?php endif; ?>
  
  <meta name="description" content="Notice"/>
  <meta name="keywords" content="QSC,求是潮,Notice"/>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/common.css" media="all">
  <script type="text/javascript" src="__PUBLIC__/js/jquery.min.js"></script>
  



  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/index.css" media="all">
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/js/fancybox/jquery.fancybox.css" media="all">
  <script type="text/javascript" src="__PUBLIC__/js/fancybox/jquery.fancybox.pack.js"></script>
  
  <script type="text/javascript" src="__PUBLIC__/js/notice.dock.js"></script>
  <link rel="stylesheet" type="text/css" href="__PUBLIC__/css/srtp.css" media="all">
  <script>
	function setTab(n){
      var tli=document.getElementById("tags").getElementsByTagName("div");  
      var mli=document.getElementById("tagcontents").getElementsByTagName("div");  
      for(i=0;i<tli.length;i++){  
      tli[i].className=i==n?"taghover":"nothover";  
      mli[i].style.display=i==n?"block":"none";  
      } 
    }  
  </script>
</head>
<body>
	<div id="topbar">
		<div id="topbar_sub">
		<div id="topbar_info" class="clearfix">
			<a href = "http://www.qsc.zju.edu.cn/" target="_blank">求是潮</a>
			<p>|</p>
			<a href = "http://www.qsc.zju.edu.cn/share" target="_blank">Share学习交流平台</a>
			<a href = "http://www.qsc.zju.edu.cn/bubble" target="_blank">Bubble Music泡音乐</a>
			<a href = "__APP__">Notice</a>
		</div>
		<div id="topbar_link" class="clearfix">
			<?php if(empty($self)): ?><a href = "<?php echo U('account/login');?>" class="btn">登录</a>
			<a href = "<?php echo U('account/register');?>" class = "btn">注册</a>
			<?php else: ?>
			<a href="<?php echo U('account/');?>"     class="btn">设置</a>
			<a href="<?php echo U('account/logout');?>" class="btn">注销</a><?php endif; ?>
		</div>
		</div>
	</div>
	
    <div id = "main" class="clearfix">
    
	<div id = "nav" class="clearfix">
		<div id = "nav_menu">
			<a href = "__APP__" class = "btn" id = "nav_home"><div>首页</div></a>
			<?php if(empty($self)): ?><a href = "<?php echo U('account/login');?>" class = "btn" id = "nav_account"><div>个人主页</div></a>
			<?php else: ?>
			<a href = "<?php echo NoticeUrl::getAccount($self);?>" class = "btn" id = "nav_account"><div>个人主页</div></a><?php endif; ?>
			<a href = "<?php echo U('browse/');?>" class = "btn" id = "nav_browse"><div>活动回顾</div></a>
		</div>
		<div id = "search">
			<form  action="<?php echo U('browse/');?>" method="get">
				<input type="text" name="q" value="" id="searchtext"/>
				<input type="submit" id = "go" name="submit" value=""/>
			</form>
		</div>
	</div>
  <div id="page" class="clearfix sunye">




<?php $events= $groupEvents; ?>
<div class="picture-moving">
	<div id="hahahaha">
  <?php if(empty($events)): ?><li>Notice目前找不到符合条件的活动. </li>
	<br/>
  <?php else: ?>
      <div class="event_img">
	  <MARQUEE id="whateverbutamarquee" scrollAmount=2 scrollDelay=2 direction=right behavior=scroll  BORDER="0" ALIGN="middle" onmouseover=this.stop() onmouseout=this.start() >
	  <?php if(is_array($events)): $i = 0; $__LIST__ = $events;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><a href="<?php echo U("event/$vo[id]");?>">
          <img src = "<?php echo NoticeUrl::getEventPoster($vo['img'],'');?>" width=500 height=300 border=0>
        </a><?php endforeach; endif; else: echo "" ;endif; ?>
	</MARQUEE>
      </div><?php endif; ?>

</div>
	
</div>

<div class="col-main">

<div class="main main-wrap">

<div class="main main-nav">
  

<div id = "tagcontents">
	<ul id="navtab">
	<?php if(is_array($types)): $i = 0; $__LIST__ = $types;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li id="hehe"><a href="<?php echo U('browse/index',array('type'=>$key));?>"><?php echo ($vo); ?></a></li><?php endforeach; endif; else: echo "" ;endif; ?>
	</ul>
</div>

</div>
  <div id="group_event" class="event">
  <?php $events= $groupEvents; ?>
    <h2>社团活动</h2>
    <ul class = "section clearfix">
  <?php if(empty($events)): ?><li>Notice目前找不到符合条件的活动. </li>
  <?php else: ?>
  <?php if(is_array($events)): $i = 0; $__LIST__ = $events;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li class = "item clearfix">
      <div class="event_img">
        <a href="<?php echo U("event/$vo[id]");?>">
          <img src = "<?php echo NoticeUrl::getEventPoster($vo['img'],'m');?>" width="90" height="90" />
        </a>
      </div>
      <div class="event_info">
        <h3><a href="<?php echo U("event/$vo[id]");?>"><?php echo ($vo["title"]); ?></a></h3>
        <?php echo (substr($vo["time_start"],0,-3)); ?><br/>
        <?php echo ($vo["location"]); ?><br/>
      </div>
    </li><?php endforeach; endif; else: echo "" ;endif; ?><?php endif; ?>
</ul>



  </div>
  <div id="border_right"></div>
  <div id="user_event" class="event">
  <?php $events= $userEvents; ?>
    <h2>个人活动</h2>
    <ul class = "section clearfix">
  <?php if(empty($events)): ?><li>Notice目前找不到符合条件的活动. </li>
  <?php else: ?>
  <?php if(is_array($events)): $i = 0; $__LIST__ = $events;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li class = "item clearfix">
      <div class="event_img">
        <a href="<?php echo U("event/$vo[id]");?>">
          <img src = "<?php echo NoticeUrl::getEventPoster($vo['img'],'m');?>" width="90" height="90" />
        </a>
      </div>
      <div class="event_info">
        <h3><a href="<?php echo U("event/$vo[id]");?>"><?php echo ($vo["title"]); ?></a></h3>
        <?php echo (substr($vo["time_start"],0,-3)); ?><br/>
        <?php echo ($vo["location"]); ?><br/>
      </div>
    </li><?php endforeach; endif; else: echo "" ;endif; ?><?php endif; ?>
</ul>



  </div>
  <div class="group_page"><?php echo ($page); ?></div>
</div>

<div id="border_bottom"></div>
</div>

<div class="main col-sub">
  <div id = "log">
    
  <?php if(!empty($self)): ?><div id="login_mod" class="menu_mod" style="height:auto;">
    <div class="section clearfix" style="">
      <a href="<?php echo NoticeUrl::getAccount($self);?>" style="cursor:pointer;">
      <img src="<?php echo NoticeUrl::getPhoto($self['uid']);?>" class="photo"/>
      </a>
      <div style="margin-left:80px;">
        <a href="<?php echo NoticeUrl::getAccount($self);?>" style="cursor:pointer;">
          <?php echo ($self["name"]); ?>
        </a>
        <p class="signature"><?php echo ($self["signature"]); ?></p>
      </div>
    </div>
    <hr />
    <div class="section">
      <a id="create_event" href="<?php echo U('/event/create');?>">+ 发布新活动</a>
    </div>
  </div>
  
  <?php else: ?>
  <div id = "logbar">
  </div>
  <div id = "logcontent" class = "undertitle">
      <form id = "login" action="<?php echo U('/account/login');?>" method="post">
          <div class = "inputdiv">
          <label class = "label">用户名</label>
          <input name="username" type = "text" class = "input" id = "username"/><br/>
          </div>
          <div class = "inputdiv">
              <label class = "label">密码</label>
              <input name="password" type = "password" class = "input" id = "password"/>
          </div>
          <input type="submit" name="submit" id = "denglu" value=""/>
          
      </form>
	  <form>
	  	  <a href="<?php echo U('account/register');?>">
		<input type="submit" id="zhuce" value=""/>
		</a>
	  </form>

      
  </div><?php endif; ?>
  </div>
  <div id = "group">
    <div id="groupbar">
	</div>
	<div id="groupinfo">
		<div class = "undertitle clearfix">
		<?php $users= $groups; ?>
		    <ul class="clearfix users_lite">
    <?php if(is_array($users)): $i = 0; $__LIST__ = $users;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): ++$i;$mod = ($i % 2 )?><li>
        <a href="<?php echo NoticeUrl::getAccount($vo);?>">
          <img src = "<?php echo NoticeUrl::getPhoto($vo['uid']);?>" >
        </a>
	<div><?php echo ($vo["name"]); ?> </div>
      </li><?php endforeach; endif; else: echo "" ;endif; ?>
    </ul>
		</div>
	</div>
  </div>
</div>


 
    </div>
    <div id = "footer">
    </div>
  </div>
  <div id="dock">
  <div class="main-wrap">
    <?php if(empty($self)): ?><a id="dock_login" href = "<?php echo U('/account/login');?>" class = "navtopy">登录</a>
    | <a id="dock_alert" href="<?php echo U('/alert/');?>" class="navtopy">系统消息</a>
    | <a id="dock_register" href = "<?php echo U('/account/register');?>" class = "navtopy">注册</a>
    <?php else: ?>
    <a id="dock_account" href="<?php echo NoticeUrl::getAccount($self);?>"><?php echo ($self["name"]); ?></a>
    | <a id="dock_setting" href="<?php echo U('Home-account/');?>" class="navtopy">设置</a>
    <!--| <a id="dock_pm" href="<?php echo U('Home-pm/');?>" class="navtopy">短信</a>  TODO-->
    | <a id="dock_alert" href="<?php echo U('/alert/');?>" class="navtopy">系统消息</a>
    | <a id="dock_logout" href="<?php echo U('/account/logout');?>" class="navtopy">注销</a><?php endif; ?>
  </div>
  <script type="text/javascript">
    $(document).ready(function(){
      NoticeDock.get({
        uid:  "<?php echo ($self["uid"]); ?>",
        username: "<?php echo ($self["name"]); ?>"
      });
    });
  </script>
</div>
</body>
</html>